home *** CD-ROM | disk | FTP | other *** search
/ PC Home 138 / PC Home issue 138.iso / PCHome.exe / scripts / DefineButton2_55 / BUTTONCONDACTION on(release).as < prev    next >
Encoding:
Text File  |  2003-12-04  |  801 b   |  32 lines

  1. on(release){
  2.    if(link.substr("1","7") eq "http:/ /")
  3.    {
  4.       trace("I\'m a live web page");
  5.       getURL(link,"_blank");
  6.    }
  7.    else if(eval("../../:disclaimeraccepted") eq "yes")
  8.    {
  9.       NumberOfChars = length(link);
  10.       LookForThisChar = NumberOfChars - "3";
  11.       trace("This is Look for this char" add LookForThisChar);
  12.       if(link.substr(LookForThisChar,"4") eq ".exe")
  13.       {
  14.          trace("I\'m an exe");
  15.          fscommand("exec",eval("../../:PathtoCD") add link);
  16.       }
  17.       else
  18.       {
  19.          getURL(link,"");
  20.          trace("I\'m a URL");
  21.       }
  22.    }
  23.    else
  24.    {
  25.       tellTarget("../../Disclaimer")
  26.       {
  27.          gotoAndStop("disclaimer");
  28.       }
  29.       set("../../Disclaimer:filetolaunch",eval("../../:PathtoCD") add link);
  30.    }
  31. }
  32.